import 'package:json_annotation/json_annotation.dart';

part 'video_data_json.g.dart';

@JsonSerializable()
class VideoData {
  final String? actors;

  final String? description;

  final String? directors;

  final List<String>? genres;

  final String? id;

  final String? imdbId;

  final List<String>? items;

  @JsonKey(name: "items_lang")
  final List<String>? itemsLang;

  final String? popularity;

  @JsonKey(name: "poster_big")
  final String? posterBig;

  @JsonKey(name: "poster_med")
  final String? posterMed;

  final double? rating;
  final int? runtime;
  final String? title;
  final String? trailer;
  final String? writers;
  final int? year;

  VideoData(
      {this.actors,
      this.description,
      this.directors,
      this.genres,
      this.id,
      this.imdbId,
      this.items,
      this.itemsLang,
      this.popularity,
      this.posterBig,
      this.posterMed,
      this.rating,
      this.runtime,
      this.title,
      this.trailer,
      this.writers,
      this.year});

  factory VideoData.fromJson(Map<String, dynamic> json) =>
      _$VideoDataFromJson(json);
  Map<String, dynamic> toJson() => _$VideoDataToJson(this);
}
